import request from '@/utils/request'

export function get(data) {
  var params = "?";
  if(data instanceof Object) {
    var aa = Object.keys(data);
    aa.forEach(item => {
      params = params + item + "=" + data[item] + "&";
    });
    params = params.substring(0, params.length - 1);
  }
  return request({
    url: 'api/feedback' + params,
    method: 'get',
    data
  })
}

export function del(data) {
  return request({
    url: 'api/feedback',
    method: 'delete',
    data
  })
}

export function put(data) {
  return request({
    url: 'api/feedback',
    method: 'put',
    data
  })
}

export default { get , del, put}
